@use 'sass:map';
@use 'mixins.scss' as *;
@use 'element-plus/theme-chalk/src/dark/css-vars.scss';

// Background
$bg-color: () !default;
$bg-color: map.merge(
    (
        '': #141414,
        'overlay': #1d1e1f,
    ),
    $bg-color
);

// Border
$border-color: () !default;
$border-color: map.merge(
    (
        '': #58585b,
    ),
    $border-color
);

html.dark {
    @include set-component-css-var('bg-color', $bg-color);
    @include set-component-css-var('border-color', $border-color);
}

html.dark {
    // ant暗夜主题
    .ant-modal {
        background-color: #1d1e1f;
        .ant-modal-title {
            color: #fff;
        }
        .ant-modal-content {
            background-color: #1d1e1f;
            border-color: #58585b;
            .ant-modal-header {
                background-color: #1d1e1f;
                border-color: #58585b;
                color: #fff;
            }
        }
    }
    .ant-input {
        color: #fff;
        background-color: #1d1e1f;
        border-color: #58585b;
        &::-webkit-input-placeholder {
            color: #8c8c8c;
        }
    }
    .ant-input-affix-wrapper {
        color: #fff;
        background-color: #1d1e1f;
        border-color: #58585b;
        .ant-input {
            color: #fff;
            background-color: #1d1e1f;
        }
    }
    .ant-btn-default {
        color: #fff;
        background-color: #1d1e1f;
        border-color: #58585b;
    }
    .ant-tag {
        color: #fff;
        background-color: #1d1e1f;
        border-color: #58585b;
    }
    .ant-popover {
        background-color: #1d1e1f;
        border-color: #58585b;
        .ant-popover-inner {
            background-color: #1d1e1f;
            border-color: #58585b;
        }
    }
    .ant-dropdown {
        background-color: #1d1e1f;
        border-color: #58585b;
        .ant-dropdown-menu {
            background-color: #1d1e1f;
            border-color: #58585b;
            .ant-dropdown-menu-item {
                color: #fff;
            }
            .ant-dropdown-menu-submenu {
                .ant-dropdown-menu-submenu-title {
                    color: #fff;
                }
                .anticon-right {
                    color: #fff;
                }
            }
            .ant-dropdown-menu-item-disabled {
                color: #fff;
            }
        }
    }
}
